﻿using System.Linq;

namespace LaoLuo
{
    public abstract class MultiTypeObjectBase
    {
        protected MultiTypeObject _multiTypeObject;

        public void Absorb(params dynamic[] objs)
        {
            var objects = objs.ToList();
            objects.Add(this);
            _multiTypeObject = new MultiTypeObject(objects);
        }

        public T Call<T>(string action, params object[] parameters)
        {
            return (T)_multiTypeObject.Call(action, parameters);
        }
    }
}
